From 08ad6dbed6305995397c644be34df64aabe472b6 Mon Sep 17 00:00:00 2001 From: robertl Date: Thu, 19 Jun 2008 14:49:08 +0000 Subject: [PATCH] Toss non-ascii characters in mkshort. --- mkshort.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mkshort.c b/mkshort.c index e1e1b96fa..9add38dc6 100644 --- a/mkshort.c +++ b/mkshort.c @@ -382,7 +382,6 @@ mkshort(short_handle h, const char *istring) int i, l, nlen, replaced; mkshort_handle *hdl = (mkshort_handle *) h; - /* * A rather horrible special case hack. * If the target length is "6" and the source length is "7" and @@ -454,6 +453,8 @@ mkshort(short_handle h, const char *istring) continue; if (hdl->goodchars && (!strchr(hdl->goodchars, tstring[i]))) continue; + if (!isascii(tstring[i])) + continue *cp++ = tstring[i]; } *cp = 0; -- 2.30.2